package com.flydog.mall.entity.pms;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

/**
 * @author Cao
 * @description 商品参数值。如果对应的参数是规格且规格支持手动添加，那么该表用于存储手动新增的值；如果对应的商品属性是参数，那么该表用于存储参数的值
 * @create 2021-03-21
 */

@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "pms_product_attribute_value")
public class PmsProductAttributeValue {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false, unique = true, updatable = false, insertable = false)
    private Long id;

    @Column(name = "product_id", nullable = false)
    private Long productId;

    @Column(name = "product_attribute_id", nullable = false)
    private Long productAttributeId;

    @Column(name = "value", nullable = false)
    private String value;
}
